﻿@model TaskManager.Models.DepartmentModel
@{
    ViewBag.Title = "Create Department";
    
}
<div class="box box-primary">
    <div class="box-header">
        <h3 class="box-title">Create Department</h3>
    </div>

    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()
        <div class="box-body">
            <div class="form-group">
                @Html.HiddenFor(m => m.Id)
                @Html.LabelFor(m => m.Name)
                @Html.TextBoxFor(m=>m.Name, new { @class = "form-control" })
            </div>
            <div class="form-group">
                @Html.LabelFor(m=>m.UserId)
                @Html.DropDownListFor(m=>m.UserId, new SelectList(ViewBag.ListUsers,"Id","UserName"),"--select leader--", new { @class = "form-control" })
            </div>
            @Html.ValidationSummary(true)
        </div>
        <div class="box-footer">
            <button type="submit" class="btn btn-primary">Save</button>
            <a href="@Url.Action("Index")" class="btn btn-primary">Cancel</a>
        </div>
    }
</div>
